<%@ page language="java" import="java.util.*" pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<%
	String baseServer = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort();
	String thisPath = request.getContextPath();
	String basePath = baseServer + thisPath +"/";
	
	String datetime = (new Date()).toGMTString();
		
%>

<!DOCTYPE html>
<html lang="en">
	<head>
		<base href="<%=basePath%>">
		<meta charset="utf-8" />
		<title>登录</title>
		<link rel="shortcut icon" href="logo.ico" type="image/x-icon" />
		
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  		<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1";/><!-- IE的渲染模式 -->
  		<meta name="renderer" content="webkit"><!-- 浏览器高速模式 -->  		

		<meta name="keywords" content="信帧,teleframe,iparking,I停车,爱停车,blackshadowwalker" />
		<meta name="description" content="信帧,teleframe,iparking,I停车,爱停车,blackshadowwalker" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />

		<script src="scripts/jquery/jquery-1.7.min.js"></script>
		
					<!-- Message plug -->
	<script src="plugins/HubSpotMessager/build/js/messenger.js"></script>
	<link href="plugins/HubSpotMessager/build/css/messenger.css" rel="stylesheet" />
	<link href="plugins/HubSpotMessager/build/css/messenger-theme-air.css" rel="stylesheet" />
	<link href="plugins/HubSpotMessager/build/css/messenger-theme-block.css" rel="stylesheet" />
	<link href="plugins/HubSpotMessager/build/css/messenger-theme-flat.css" rel="stylesheet" />
	<link href="plugins/HubSpotMessager/build/css/messenger-theme-future.css" rel="stylesheet" />
	<link href="plugins/HubSpotMessager/build/css/messenger-theme-ice.css" rel="stylesheet" />
	
		<script src="index/js/index.js"></script>
		
		<!-- basic styles -->

		<link href="theme/ace/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="theme/ace/css/font-awesome.min.css" />
		

		<!--[if IE 7]>
		  <link rel="stylesheet" href="theme/ace/css/font-awesome-ie7.min.css" />
		<![endif]-->

		<!-- page specific plugin styles -->

		<!-- ace styles -->

		<link rel="stylesheet" href="theme/ace/css/ace.min.css" />
		<link rel="stylesheet" href="theme/ace/css/ace-rtl.min.css" />

		<!--[if lte IE 8]>
		  <link rel="stylesheet" href="theme/ace/css/ace-ie.min.css" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

		<!--[if lt IE 9]>
		<script src="theme/ace/js/html5shiv.js"></script>
		<script src="theme/ace/js/respond.min.js"></script>
		<![endif]-->
		
		<style>
			.login-page{
				color: #fff;
				background: url('images/bg.png') repeat-x;
				background-positon: 100%, 100%; 
				background-color: #fff;
			}
		</style>
		
		<script type="text/javascript">
			
			$(document).ready(function(){
			
				if (top.location != location)  
				{  
					top.location.href = location.href; //防止网页被别站用 iframe嵌套
				} 
				
				//HubSpot Messager 
				Messenger.options = {
				    extraClasses: 'messenger-fixed messenger-on-top',
				    theme: 'flat'
				}
				var msg = "${msg}";
				if(msg!="null" && msg!=""){
					alert(msg);
				}
			
				var loginAction = "${loginAction}";
				if(loginAction=="")
					window.top.location.href="<%=thisPath%>";
				document.getElementById("user.userCode").focus();
			});
			
		</script>
		
	</head>

	<body class="login-layout login-page" >
		<div class="main-container">
			<div class="main-content">
				<div class="row">
					<div class="col-sm-10 col-sm-offset-1">
						<div class="login-container">
							<div class="center">
								<h1>
									<i class="icon-leaf green"></i>
									<span class="white">任我停</span>
								</h1>
								<h4 class="" style="color:#00ee00;">&copy; Teleframe</h4>
							</div>

							<div class="space-6"></div>

							<div class="position-relative">
								<div id="login-box" class="login-box visible widget-box no-border">
									<div class="widget-body">
										<div class="widget-main">
											<h4 class="header blue lighter bigger">
												<i class="icon-coffee green"></i>
												${title }
												<span>
													
												</span>
											</h4>

											<div class="space-6"></div>

											<form id="loginform" name="loginform"   autocomplete="off"  action="${loginAction}?<%=datetime %>"  method="post" target="_parent" >
												<fieldset>
													<div class="hidden">
															<input name="loginAction" value="${loginAction }"> 
															<input name="method" value="login">
													</div>
													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="text" id="user.userCode" name="user.userCode" autocomplete="off" value="${user.userCode }" class="form-control" placeholder="帐号"
																	maxlength="20" onKeypress="if ((event.keyCode > 32 && event.keyCode < 48) || (event.keyCode > 57 && event.keyCode < 65) || (event.keyCode > 90 && event.keyCode < 97)) event.returnValue = false;" 
																	onKeyDown="javascript:if (event.keyCode==13) event.keyCode=9;"/>
															<i class="icon-user"></i>
														</span>
													</label>

													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="password"  name="user.userPasswd"  autocomplete="off" class="form-control" placeholder="密码" 
																	maxlength="20" onKeypress="if ((event.keyCode > 32 && event.keyCode < 48) || (event.keyCode > 57 && event.keyCode < 65) || (event.keyCode > 90 && event.keyCode < 97)) event.returnValue = false;"
																	onKeyDown="javascript:if (event.keyCode==13) event.keyCode=9;"/>
															<i class="icon-lock"></i>
														</span>
													</label>

													<div class="space"></div>

													<div class="clearfix">
														<label class="inline">
															<input type="checkbox" class="ace" />
															<span class="lbl"> 记住密码</span>
														</label>

														<button type="submit" class="width-35 pull-right btn btn-sm btn-primary">
															<i class="icon-key"></i>
															登录
														</button>
													</div>

													<div class="space-4"></div>
												</fieldset>
											</form>
											<div style="display:none;">
												<div class="social-or-login center">
													<span class="bigger-110">Or Login Using</span>
												</div>
	
												<div class="social-login center">
													<a class="btn btn-primary">
														<i class="icon-facebook"></i>
													</a>
	
													<a class="btn btn-info">
														<i class="icon-twitter"></i>
													</a>
	
													<a class="btn btn-danger">
														<i class="icon-google-plus"></i>
													</a>
												</div>
											</div>
										</div><!-- /widget-main -->

										<div class="toolbar clearfix hidden">
											<div>
												<a href="#" onclick="show_box('forgot-box'); return false;" class="forgot-password-link">
													<i class="icon-arrow-left"></i>
													忘记密码
												</a>
											</div>
											
											<div>
												<a href="#" onclick="show_box('signup-box'); return false;" class="user-signup-link">
													注册
													<i class="icon-arrow-right"></i>
												</a>
											</div>
										</div>
									</div><!-- /widget-body -->
								</div><!-- /login-box -->

								<div id="forgot-box" class="forgot-box widget-box no-border">
									<div class="widget-body">
										<div class="widget-main">
											<h4 class="header red lighter bigger">
												<i class="icon-key"></i>
												找回密码
											</h4>

											<div class="space-6"></div>
											<p>
												请输入邮箱地址
											</p>

											<form>
												<fieldset>
													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="email" class="form-control" placeholder="邮箱" />
															<i class="icon-envelope"></i>
														</span>
													</label>

													<div class="clearfix">
														<button type="button" class="width-35 pull-right btn btn-sm btn-danger">
															<i class="icon-lightbulb"></i>
															发送!
														</button>
													</div>
												</fieldset>
											</form>
										</div><!-- /widget-main -->

										<div class="toolbar center">
											<a href="#" onclick="show_box('login-box'); return false;" class="back-to-login-link">
												返回登录
												<i class="icon-arrow-right"></i>
											</a>
										</div>
									</div><!-- /widget-body -->
								</div><!-- /forgot-box -->

								<div id="signup-box" class="signup-box widget-box no-border">
									<div class="widget-body">
										<div class="widget-main">
											<h4 class="header green lighter bigger">
												<i class="icon-group blue"></i>
												注册
											</h4>

											<div class="space-6"></div>
											<p> 个人信息: </p>

											<form>
												<fieldset>
													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="email" class="form-control" placeholder="邮箱" />
															<i class="icon-envelope"></i>
														</span>
													</label>

													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="text" class="form-control" placeholder="用户帐号" />
															<i class="icon-user"></i>
														</span>
													</label>

													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="password" class="form-control" placeholder="密码" />
															<i class="icon-lock"></i>
														</span>
													</label>

													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="password" class="form-control" placeholder="再次输入密码" />
															<i class="icon-retweet"></i>
														</span>
													</label>

													<label class="block">
														<input type="checkbox" class="ace" />
														<span class="lbl">
															我接受
															<a href="#">用户协议</a>
														</span>
													</label>

													<div class="space-24"></div>

													<div class="clearfix">
														<button type="reset" class="width-30 pull-left btn btn-sm">
															<i class="icon-refresh"></i>
															重置
														</button>

														<button type="button" class="width-65 pull-right btn btn-sm btn-success">
															注册
															<i class="icon-arrow-right icon-on-right"></i>
														</button>
													</div>
												</fieldset>
											</form>
										</div>

										<div class="toolbar center">
											<a href="#" onclick="show_box('login-box'); return false;" class="back-to-login-link">
												<i class="icon-arrow-left"></i>
												返回登录
											</a>
										</div>
									</div><!-- /widget-body -->
								</div><!-- /signup-box -->
							</div><!-- /position-relative -->
						</div>
					</div><!-- /.col -->
				</div><!-- /.row -->
			</div>
		</div><!-- /.main-container -->
		
		<s:if test="referer!=null">
			<div id="site-navbar" style="position: absolute; top: -4px; left: -3px; border: 0; z-index: 2000;padding:0;margin:0;">
				<a href="#" title="返回首页" style="background:none;">
				<img src="images/index/return-back.png" style="padding:0;margin:0;border:0; -webkit-box-shadow: none;-moz-box-shadow: none;box-shadow: none;">
				</a>
			</div>
		</s:if>

		<!-- basic scripts -->

		<!--[if !IE]> -->

		<script src="scripts/jquery/2.0.3/jquery.min.js"></script>

		<!-- <![endif]-->

		<!--[if IE]>
<script src="script/jquery/1.10.2/jquery.min.js"></script>
<![endif]-->

		<!--[if !IE]> -->

		<script type="text/javascript">
			window.jQuery || document.write("<script src='theme/ace/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
		</script>

		<!-- <![endif]-->

		<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='theme/ace/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
</script>
<![endif]-->

		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='theme/ace/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>

		<!-- inline scripts related to this page -->

		<script type="text/javascript">
			function show_box(id) {
			 jQuery('.widget-box.visible').removeClass('visible');
			 jQuery('#'+id).addClass('visible');
			}
		</script>
</body>
</html>
